# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python

class Recipe(recipe.Recipe):
    name = 'libmms'
    version = '0.6.4'
    stype = SourceType.TARBALL
    url = 'http://sourceforge.net/projects/libmms/files/libmms/0.6.4/libmms-0.6.4.tar.gz'
    licenses = [License.LGPLv2_1Plus]
    patches = ['libmms/0001-Use-native-iconv-in-windows.patch',
               'libmms/0002-uri-Add-implementation-of-strndup-for-platforms-that.patch',
               'libmms/0005-Fix-build-on-OSX-leopard.patch']
    autoreconf = True
    files_libs = ['libmms']
    files_devel = ['include/libmms', 'lib/pkgconfig/libmms.pc']

    def prepare(self):
        if self.config.target_platform == Platform.ANDROID:
            self.append_env = {'LDFLAGS': '-liconv'}
